package com.lg.shiro;

import org.apache.shiro.cache.AbstractCacheManager;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.lg.annotation.JedisClient;

@Repository
public class RedisCacheManager extends AbstractCacheManager {
	@Autowired
	private RedisCache redisCache;

	@Override
	protected Cache<Object, Object> createCache(String name) throws CacheException {
		// TODO Auto-generated method stub
		getRedisCache().setName(name);
		return redisCache;
	}
	public RedisCache<Object, Object> getRedisCache() {
		return redisCache;
	}
}
